home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
8bitfiles.net/archives
/
archives.tar
/
archives
/
commodore-users-of-norman
/
CUON_121_(06-1985).d64
/
kilowatt analysi
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2019-04-13
|
4KB
|
185 lines
1 REM ANN F. SYKES
2 REM 3270 SE 18TH AVENUE
3 REM GAINESVILLE, FL. 32601
4 REM (904) 378-4862
5 REM
6 REM
10 POKE53280,1:POKE53281,1
15 PRINT"[147]
20 [129]I[178]1[164]3
25 [153]"":[130]
30 [153][163]13);"KILOWATT ANALYST":[129]DE[178]1[164]1500:[130]
40 [153]"LOAD ";
50 [153][163]15)" SYS OPTIONS:CONT":[153]:[153]
60 [153][163]11)" FORM WAITCONT ETER ANALYSIS":[153]
65 [153][163]11)" FORA WAIT CONT PPLIANCE COST ANALYSIS":[153]
75 [153][163]11)"YOUR CHOICE
80 GETZ$:IFZ$=""THEN80
85 IFZ$="M"THEN500
95 IFZ$<>"A"THEN80
200 CLR:PRINT"[147]"
210 PRINT"THIS SECTION WILL COMPUTE THE COST OF"
220 PRINT"ELECTRICAL APPLIANCES AROUND YOUR HOME."
230 PRINT"YOU'LL NEED YOUR ELECTRIC BILL FROM"
240 PRINT"LAST MONTH."
250 PRINT"";
252 GOSUB5000
260 INPUT"[147] ENTER LAST MONTH'S BILL";LA
270 INPUT" ENTER TOTAL KILOWATT-HOURS USED";TK
280 AV=LA/TK:AV=INT(AV*100+.5)/100
290 PRINT" YOUR COST PER KWH-";AV
295 PRINT:PRINT:PRINTTAB(16)" [156]ANALYSIS[146] [154]":PRINT:PRINT
300 INPUT" NAME OF APPLIANCE";NA$
310 PRINT" WATTAGE OF "NA$;
320 INPUTWA
330 INPUT" HRS OF OPERATION/DAY";HR
340 CS=(WA*HR)*(30.4/1000*AV)
350 J=J+1
360 SU=SU+CS
370 CS=INT(CS*100+.5)/100:SU=INT(SU*100+.5)/100
380 PRINT"[147] THE COST OF OPERATING YOUR"
390 PRINT" "NA$" FOR 1 MONTH"
400 PRINT" IS ";"$";CS
410 IFJ>1THEN440
420 PRINT" WANT ANOTHER APPLIANCE (Y/N)?
421 [161]C$:[139]C$[178]""[167]421
422 [139]C$[178]"Y"[167]300
423 [139]C$[179][177]"N"[167]421
430 [153]" WANT TO RETURN TO MAIN MENU (Y/N)?
432 GETC$:IFC$=""THEN432
433 IFC$="Y"THEN40
434 IFC$<>"N"THEN432
435 STOP
440 PRINT" WANT TO SEE MONTHLY TOTALS (Y/N)?
441 [161]C$:[139]C$[178]""[167]441
442 [139]C$[178]"N"[167]420
443 [139]C$[179][177]"Y"[167]441
450 [139] C$[178]"N"[167][137]420
460 [153]" YOUR TOTALS THUS FAR ARE ";SU:[137]420
500 [156]:[153]"LOAD ";
501 [153][163]5)"DO YOU WANT TO:":[153]:[153]
502 [153][163]10)" FORVWAITCONT IEW DATA":[153]
503 [153][163]10)" FOREWAITCONT NTER DATA":[153]
504 [153][163]10)"YOUR CHOICE
505 GETZ$:IFZ$=""THEN505
506 IFZ$="E"THEN50000
507 IFZ$<>"V"THEN505
508 PRINT"[147]":Q=1000
509 RESTORE
510 READA
520 READB,C,D$
530 PRINT"FIRST READ ON "D$;B;" WAS ";C
540 PRINT:PRINT"COST PER KWH IS ";A
550 PRINT:PRINT"DATE READ";TAB(12);"METER";TAB(19);"KWH USED";TAB(29);"COST/DAY
560 [153]"VALVALVALVALVALVALVALVALVAL";[163]12);"VALVALVALVALVAL";[163]19);"VALVALVALVALVALVALVALVAL";[163]29);"VALVALVALVALVALVALVALVAL
570 G1=C
580 B2=B
600 FORI=1TOQ
610 K=1
620 READB
630 IFB=0THEN760
640 IFB<B2THEN660
650 K=B-B2
660 B2=B
670 READF,D$
680 H=F-G1
690 G=H*A
700 PRINTB;D$;TAB(12);F;TAB(19);H;TAB(29);G
720 G1=F
730 G2=G2+G
740 K1=K1+K
750 NEXTI
760 G3=F-C
770 PRINTTAB(19);"[197][197][197][197][197]";TAB(29);"[197][197][197][197][197]
780 [153][163]5);"TOTALS";[163]19);G3;[163]29);G2
800 [153]"VALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVALVAL
810 PRINT"TOTAL TEST DAYS:";K1
820 X=G3/K1:X=INT(X*100+.5)/100
830 Y=G2/K1:Y=INT(Y*100+.5)/100
840 PRINT"AVG DAILY USE:"X;"KWH
850 [153]"AVG DAILY COST: $"Y
860 [153]:[153]"DO YOU WANT HARDCOPY (Y/N)?
861 GETPO$:IFPO$=""THEN861
862 IFPO$="Y"THEN6000
863 IFPO$<>"N"THEN861
864 PRINT:PRINT"WANT TO RETURN TO MAIN MENU (Y/N)?
865 [161]C$:[139]C$[178]""[167]865
866 [139] C$[178]"Y"[167]40
867 [139]C$[179][177]"N"[167]865
868 [144]
870 [131].085
871 [131]2,1100,FEB
872 [131]3,1290,FEB
873 [131]4,1460,FEB
874 [131]5,1720,FEB
875 [131]6,2100,FEB
876 [131]8,2470,FEB
877 [131]9,2680,FEB
878 [131]10,2980,FEB
879 [131]11,3290,FEB
880 [131]12,3500,FEB
1000 [131]0
5000 [153][163]8)"SYSHIT ANY KEY TO CONTINUEWAITCONT
5010 WAIT197,64,64:POKE198,0
5020 RETURN
6000 CLR:PRINT"[147]";
6010 PRINTTAB(16)"[156]PRINTING[146][154]
6020 [159]4,4:[157]4
6030 [140]
6035 Q[178]1000
6040 [135]A
6050 [135]B,C,D$
6060 [153]"YOUR FIRST READ ON "D$;B$;" WAS ";C
6070 [153]:[153]"YOUR COST PER KWH IS ";A
6080 [153]:[153]"DATE READ";[199](16);"20METER";[199](16);"40KWH USED";
6090 [153][199](16);"60COST/DAY
6100 PRINT"[197][197][197][197][197][197][197][197][197]";CHR$(16);"20[197][197][197][197][197]";CHR$(16);"40[197][197][197][197][197][197][197][197]";
6110 PRINTCHR$(16);"60[197][197][197][197][197][197][197][197]
6120 G1[178]C
6130 B2[178]B
6140 [129]I[178]1[164]Q
6150 K[178]1
6160 [135]B
6170 [139]B[178]0[167]6290
6180 [139]B[179]B2[167]6200
6190 K[178]B[171]B2
6200 B2[178]B
6210 [135]F,D$
6220 H[178]F[171]G1
6230 G[178]H[172]A
6240 [153]B;D$;[199](16);"20"F;[199](16);"40"H;[199](16);"60"G
6250 G1[178]F
6260 G2[178]G2[170]G
6270 K1[178]K1[170]K
6280 [130]I
6290 G3[178]F[171]C
6300 [153][199](16);"40VALVALVALVALVAL";[199](16);"60VALVALVALVALVALVAL
6310 PRINTCHR$(16);"05TOTALS";CHR$(16);"40"G3;CHR$(16);"60"G2
6320 PRINT"[197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197]
6330 [153]"TOTAL TEST DAYS:";K1
6340 X[178]G3[173]K1:X[178][181](X[172]100[170].5)[173]100
6350 Y[178]G2[173]K1:Y[178][181](Y[172]100[170].5)[173]100
6360 [153]"AVERAGE DAILY USE:";X;"KWH
6370 PRINT"AVERAGE DAILY COST: $";Y
6380 PRINT#4:CLOSE4:GOTO864
50000 CLR:PRINT"[147]";:PRINTTAB(3)"[156]DATA ENTRIES BEGIN WITH LINE 870[146][154]
50001 [153]:[153][163]3)"CLRTHEY ARE INCREMENTED BY ONEWAITCONT
50002 PRINT:PRINTTAB(3)"[156]PLEASE CHECK FOR LAST ENTRY LINE,[146][154]
50003 [153]:[153][163]3)"CLRTHEN TYPE RUN 50008,WAITCONT
50004 PRINT:PRINT:GOSUB5000
50006 LIST870-1000
50008 PRINT:PRINT:PRINT"ENTER STARTING,ENDING LINE NUMBER:":INPUTT,G
50009 IFT>50000ORG>50000ORG<TTHEN50008
50010 INPUT"INCREMENT LINES BY";FT:Y=T
50011 PRINTCHR$(147)Y;"DATA ";:H$=""
50012 GETA$:IFA$=""THENPRINT"[209][157]";:GOTO50012
50013 IFLEN(H$)>65ANDA$<>CHR$(13)ANDA$<>CHR$(20)THEN50012
50014 IFA$=CHR$(20)ANDLEN(H$)=0THEN50012
50015 PRINTA$;:IFA$=CHR$(20)THENH$=LEFT$(H$,LEN(H$)-1):GOTO50012
50016 IFA$=CHR$(13)THEN50018
50017 H$=H$+A$:GOTO50012
50018 PRINT"Y=";Y;":FT=";FT;":G=";G:PRINT"GOTO50020":POKE631,19:POKE632,13
50019 POKE633,13:POKE634,145:POKE635,145:POKE636,13:POKE198,6:END
50020 Y=Y+FT:IFY>GTHENEND
50021 GOTO50011